
#include <signal.h>
#include <iostream>
void handler(int signum)
{
    std::cout << signum << std::endl;
    exit(0);
}

int main()
{
    while(true)
       signal(SIGINT,handler);
    return 0;
}